#include <stdio.h>

int array[] = {
	1, 2, 3, 4, 5
};

#define ELEMENTS (sizeof(array)/sizeof(array[0]))


int main(){
	/*
	if(-1 < (unsigned char)1)
		printf("-1 is less than (unsigned char)1: ANSI semantics ");
	else
		printf("-1 is NOT less than (unsigned char)1: K&R semantics");
	*/

	int d = -1, x;

	if(d <= (int)ELEMENTS - 2)
            x = array[d+1];
	else
		x = array[2];

	printf("%d\n", x);
}
